Add OCM notifications research notes#355
Conversation
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
mickenordin
left a comment
There was a problem hiding this comment.
Very nice research!
I have another use case for the notifications endpoint:
In the context of federated groups, we would need to be able to update group state in each participating server. IMO the natural protocol to build federated groups on, for an IETF specification, is MLS: https://www.rfc-editor.org/rfc/rfc9420.html
If we want to do MLS over OCM, we need a way to exchange messages between servers, and I think the notifications endpoint is that way. BUT, I think that maybe MLS over OCM should be a separate RFC, and we should not cram that into this ID, but jut keep that in mind, that we may want to recharter and be able to reuse /notifications for that purpose when the core specification is out the door.
|
I concur this is a very good research! Let's merge it as is for now, then we'll see what to do for the spec itself |
This PR adds the current research notes for
/notificationsaround issue #350.This research is about what the current code does today. Right now the RFC text is
still narrower than the code in a few places. The gap shows up in the
notification types, the request body, binding, discovery, and also in what it
should mean when a server says it supports notifications.
The notes in this PR look at:
The goal is to keep the public notes easy to read, while still keeping the main
implementation facts that may matter later for spec work.
Main Things Seen
story, while
spec.yamlalready lists more file-share notification types.behavior is split across the main OCM route, older OCS fallbacks, and some
app-specific paths.
talk-room, so/notificationsis already more than a file-share path.choices for binding and permission updates.
/ocm/notificationsand returning201 Createdstill does not say much byitself about what is really handled behind the route.
Common Points In The Code
The request body keeps coming back. The RFC and
spec.yamldo not line up verywell on required fields, and the code reads more like "notification object
required" than "mostly optional".
Binding also keeps coming back. Nextcloud mainly uses
notification.sharedSecret. oCIS / reva leans more ongrantee,providerId,and
protocol. This changes how two servers decide that a notification pointsto the same earlier share state.
Discovery is still uneven. Some servers advertise
notifications, some donot, some expose the route without advertising it, and some add extra legacy
names.
The scope is also wider than I thought. The endpoint already
carries file updates, calendar sync, and Talk room updates, so the spec may
need a cleaner way to separate a small shared core from resource-specific
behavior.
Receiver behavior is another repeated point. Malformed request, sender trust,
object binding, and actual state change are different stages, but the current
text does not separate them very well.
What Is In This PR
work/notifications/researchnotes